package com.xuliugen.rocketmq.springboot.starter;

import com.xuliugen.rocketmq.springboot.starter.consumer.RocketMQListener;
import com.xuliugen.rocketmq.springboot.starter.consumer.annotation.RocketMQMessageListener;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Slf4j
@Service
@RocketMQMessageListener(topic = "test-topic-2", consumerGroup = "my-consumer_test-topic-2")
public class MyConsumer implements RocketMQListener<OrderPaidEvent> {

    @Override
    public void onMessage(OrderPaidEvent orderPaidEvent) {
        log.info("received orderPaidEvent: {}", orderPaidEvent);
    }
}